package org.idea.qiyu.threadpool.demo.scheduletask;

import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * @Author linhao
 * @Date created in 8:50 上午 2021/10/17
 */
@Configuration
public class HeartBeatTaskConfig implements CommandLineRunner {

    @Resource
    private HeartBeatTaskService heartBeatTaskService;

    @Override
    public void run(String... args) throws Exception {
//        System.out.println("------ 触发启动任务 ------");
        heartBeatTaskService.sendBeatInfo();
    }
}
